﻿#ifndef U_StatusBar_H
#define U_StatusBar_H

#include <QSound>
#include "mywidget.h"

class StatusBar : public MyWidget
{
    Q_OBJECT
public:
    explicit StatusBar(QWidget *parent = nullptr);

protected:
    void paintEvent(QPaintEvent *event);

signals:

public slots:
    void OnTimer();
    void UserChange();

    void SetPlaySound(QString url);

private:

    void InitWidget();
    void SetupConnections();
    void Initialize();

    TStateTool *state1;
    TStateTool *state2;
    TStateTool *state3;

    QTimer  *timer;
    QLabel  *labTime;
    QLabel  *labUser;
    QSound  *sound = nullptr;
};

#endif // U_StatusBar_H
